﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartMathLibrary.DataMining.ClusterAnalysis
{
    /// <summary>
    /// This class represents an item of the self organising map.
    /// </summary>
    [Serializable]
    public class SelfOrganisingMapItem : ISelfOrganisingMapItem
    {
        /// <summary>
        /// The data of the item.
        /// </summary>
        private double[] data;

        /// <summary>
        /// The reference object of the item.
        /// </summary>
        private Object referenceObject;

        /// <summary>
        /// Initializes a new instance of the <see cref="SelfOrganisingMapItem"/> class.
        /// </summary>
        /// <param name="data">The data of the item.</param>
        /// <param name="referenceObject">The reference object of the item.</param>
        public SelfOrganisingMapItem(double[] data, Object referenceObject)
        {
            this.data = data;
            this.referenceObject = referenceObject;
        }

        /// <summary>
        /// Gets or sets the data of the item.
        /// </summary>
        /// <value>The data of the item.</value>
        public double[] Data
        {
            get { return data; }
            set { data = value; }
        }

        /// <summary>
        /// Gets or sets the reference object of the item.
        /// </summary>
        /// <value>The reference object of the item.</value>
        public object ReferenceObject
        {
            get { return referenceObject; }
            set { referenceObject = value; }
        }
    }
}